﻿@{
    Uri url = new Uri(Request.Url.AbsoluteUri);
    ViewBag.Server = url.GetLeftPart(UriPartial.Authority);
}


<style>
    .resourcelink {
        display: block;
        color: black;
        line-height: 2em;
        margin-left: 17px;
        padding-left: 3px;
    }

    #resourcelist a:hover {
        color: red;
    }

    div.desc {
        display: none;
    }

        div.desc img {
            width: 100%;
        }

    a:hover + div.desc {
        display: block;
        position: absolute;
        color: #333;
        top: 0;
        left: 50%;
        margin-left: -25%;
        width: 50%;
        max-width: 500px;
    }

    #resourcediv > h4 {
        line-height: 1em;
        padding: 0;
        margin: 0;
    }
</style>


<div>
    <ul id="localresources">
        <li>
            Announcements - Today
            <div></div>
        </li>
        <li>
            Cafeteria Menu - This week
            <div></div>
        </li>
        <li>
            Cafeteria Menu - Next week
            <div></div>
        </li>
        <li>
            Calendars
            <div>
                <p>
                    RVA maintains 3 school event calendars: SCHOOL (academic events); ACTIVITIES (non-academic events) and SPORTS.
                    RVA also maintains a calendar called TESTBOARD which is used by Junior High and High School teachers to coordinate tests, quizzes, and more significant assignments.
                </p>
                <ul id="calendars" style="width: 90%; margin-left: 5%">

                    <li>
                        School Calendar
                        <div></div>
                    </li>
                    <li>
                        Activities Calendar
                        <div></div>
                    </li>
                    <li>
                        Sports Calendar
                        <div></div>
                    </li>
                    <li>
                        Test Board Calendar
                        <div></div>
                    </li>
                    <li>
                        Subscribe to Calendars from another client
                        <div>
                            You can use the following links (along with your PORTAL username/password) to "Subscribe" to these calendars from your own personal calendar program (Outlook, iCalendar, etc.).
                            <ul>
                                <li>
                                    SCHOOL: This is academically oriented events - including start dates, end dates, and mid-term dates.
                                    <a href="/Calendar/ZimbraCalendar?command=SchoolICS">School.ics</a>
                                </li>
                                <li>
                                    ACTIVITIES: This is non-academic events - weekend activities, special events, etc.
                                    <a href="/Calendar/ZimbraCalendar?command=ActivitiesICS">Activities.ics</a>
                                </li>
                                <li>
                                    SPORTS: This calendar lists more academically oriented events - including start dates, end dates, and mid-term dates.
                                    <a href="/Calendar/ZimbraCalendar?command=SportsCS">Sports.ics</a>
                                </li>
                                <li>
                                    TESTBOARD:
                                    <a href="/Calendar/ZimbraCalendar?command=TestboardICS">Testboard.ics</a>
                                </li>

                            </ul>
                        </div>
                    </li>
                </ul>
            </div>
        </li>

        <li>
            Other Resources
            <div id="resourcediv">
                <h4>Hover over these resources for more information. Click to launch. Note: some of these resources ONLY work from inside RVA.</h4>
                <div id="resourcelist">

                </div>
            </div>
        </li>
    </ul>

</div>


<script>
    $(document).ready(function () {

        var currenturl = "@ViewBag.Server";

        viewModel.resourceList.transport.options.read.url = crudServiceBaseUrl + "alltables/resources?where=1=1&orderby=sequence ASC";
        viewModel.resourceList.read();
        $("#resourcelist").kendoListView({
            dataSource: viewModel.resourceList,
            template: kendo.template($("#resource-template").html())
        });
        $("#localresources").kendoPanelBar({
            expandMode: "single",
            select: expandCollapse,
            contentUrls: [
                currenturl + "/rvanet/announcements/today.html",
            currenturl + "/rvanet/cafo/thisweek.html",
            currenturl + "/rvanet/cafo/nextweek.html"        ]

            });
        $("#calendars").kendoPanelBar({
            expandMode: "single",
            select: expandCollapse,
            contentUrls: [
            "/calendar/ZMCalendarView?calname=School",
            "/calendar/ZMCalendarView?calname=Activities",
            "/calendar/ZMCalendarView?calname=Sports",
            "/calendar/ZMCalendarView?calname=Testboard",
            ""
            ]
        })
    });


</script>